﻿using Inovout.Models;
using System.ComponentModel.DataAnnotations;

namespace Inovout.YunYao.Models
{
    public partial class MonitoringNode : DataObject
    {
        [Alias("名称")]
        [Required]
        [StringLength(50)]
        public virtual string Name { get; set; }
        private string code;
        public virtual string Code
        {
            get { return code; }
            protected internal set { code = value; }
        }
        public virtual Solution Solution { get; set; }
        [Alias("对象")]
        [Required]
        public virtual MonitoringObject Object { get; set; }
        [Alias("特性")]
        [Required]
        public virtual Feature Feature { get; set; }
        [Alias("位置")]
        [Required]
        public virtual RoomLocation Location { get; set; }
        private FeatureValueDescriptor featureValueDescriptor;
        public virtual FeatureValueDescriptor FeatureValueDescriptor
        {
            get { return featureValueDescriptor ?? new FeatureValueDescriptor(); }
            set { featureValueDescriptor = value; }
        }
        public virtual MonitoringNodeStatus Status { get; set; }
    }
}
